<div class="layui-card">
    <div class="layui-card-body ">
        <form action=""  class="layui-form">
            <div class="layui-form-item">
                <div class="layui-input-inline">
                    <input type="text" name="keywords" value="{$search.keywords|default=''}" class="layui-input" placeholder="标题">
                </div>
                <div class="layui-input-inline">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>

                </div>
            </div>
        </form>
        <form action="{:url('admin/office.chapter/delpost',['doc_id'=>$docId])}" method="post" class="layui-form delete-form " id="cp-form">
            <div class="layui-btn-group">
                <a href="{:url('admin/office.chapter/addpost',['doc_id'=>$docId])}" class="layui-btn layui-btn-xs">
                    <i class="layui-icon layui-icon-addition"></i>
                    添加
                </a>
                <button data-url="{:url('admin/office.chapter/delpost',['doc_id'=>$docId])}" class="layui-btn layui-btn-xs layui-btn-danger ">
                    <i class="layui-icon">&#xe640;</i>
                    删除
                </button>
                <a href="javascript:history.go(-1);" class="layui-btn layui-btn-xs">返回</a>
            </div>
            <table class="layui-table" lay-even lay-skin="">
                <thead>
                <tr>
                    <th width="10">
                        <input type="checkbox" class="layui-input"  lay-skin="primary" lay-filter="select-all">
                    </th>
                    <th width="300">标题</th>
                    <th width="160">更新时间</th>
                    <th width="160">发布时间</th>
                    <th width="300">操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="postList" id='v'}
                <tr>
                    <td>
                        <input type="checkbox" name="idList[]" class="layui-input" lay-skin="primary" value="{$v.id}">
                    </td>
                    <td>{$v.post_title}</td>
                    <td>{$v.update_time|date="Y-m-d H:i"}</td>
                    <td>{$v.published_time|date="Y-m-d H:i"}</td>
                    <td >
                        <a href="{:url('admin/office.chapter/editpost',['id'=>$v['id'],'doc_id'=>$docId])}" class="layui-btn layui-btn-xs">编辑</a>
                        <a href="{:url('admin/office.docarticle/index',['chapter_id'=>$v['id']])}" class="layui-btn layui-btn-xs">添加文章</a>
                        <a href="{:url('admin/office.docarticle/index',['chapter_id'=>$v['id']])}" class="layui-btn layui-btn-xs">文章管里</a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            {$postList|raw}
        </form>
    </div>
</div>